<?php
require('includes/top.php');

foreach($_POST as $key => $value)
{
if($value!="" && $value!="Save")
{
/*
echo $key;
echo '=';
echo $value;
echo '<br>';*/

$data = $key.'_'.$value;

$laptop_remarks_array = explode('_',$data);

$remarks = $laptop_remarks_array[2];


$product_id = $laptop_remarks_array[1];
$sql="INSERT INTO return_accessories(`accessories_id`,`remarks`) VALUES ('$product_id','$remarks')";
$result=mysql_query($sql);
}

}

if($result>0)
{
header('Location:return_accessories.php?v=success');
}
else
{
header('Location:return_accessories.php?v=err');
}
?>